<template>
	<view class="page-body p10 bg-white" :class="[app.setCStyle()]">
		<view class="title">{{item.title}}</view>
		<view class="mt20 color-94 fs26">
			<text class="time">{{item.add_time}}</text>
		</view>
		<view class="detail-desc">
			<rich-text :nodes="item.content"></rich-text>
		</view>
		<tabbar :_current="0" :getCartNum="0"></tabbar>
	</view>
</template>


<script>
	import tabbar from '@/pages/shop/tabbar';
	export default {
		components: {
			tabbar
		},
		data() {
			return {
				item:{}
			}
		},
		onLoad(options) {
			if (options.id < 1){
				return this.app.showModal('传参错误.',-1);
			}
			this.getInfo(options.id);
		},
		onShow() {
		},
		onReady() {},
		methods: {
			getInfo(id){
				this.$u.post('publics/api.article/getInfo',{id:id}).then(res => {
					this.item = res.data;
				})
			}
		}
	}
</script>

<style lang="scss">

.title{
	margin-top: 20rpx;
	font-size: 32rpx;
	font-weight: bold;
}

/*  详情 */
	.detail-desc{
		background: #fff;
		margin-top: 16rpx;
		img{
			width: 100%;
		}
	}
</style>
